package com;


import org.springframework.context.annotation.*;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.view.InternalResourceViewResolver;


@Configuration
@ComponentScan
@EnableAspectJAutoProxy
@EnableWebMvc
public class AppConfig {

        @Bean
        public <InternalResourceViewResolver> InternalResourceViewResolver viewResolver() {
            InternalResourceViewResolver viewResolver = new InternalResourceViewResolver();
            viewResolver.setPrefix("/WEB-INF/pages/");//模板文件位置
            viewResolver.setSuffix(".jsp");// 自动解析后缀名
            return viewResolver;
        }
}